//
//  NKSettingTableViewCell.m
//  NewKY
//
//  Created by admin on 16/11/14.
//  Copyright © 2016年 Dee. All rights reserved.
//

#import "NKSettingTableViewCell.h"

@interface NKSettingTableViewCell ()
 /*---- 图片 -----*/
@property (weak, nonatomic) IBOutlet UIImageView *iconView;
 /*---- 标题 -----*/
@property (weak, nonatomic) IBOutlet UILabel *titleLabel;

@property (weak, nonatomic) IBOutlet UIView *lineView;

@end


@implementation NKSettingTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];

    self.titleLabel.textColor = [UIColor darkGrayColor];
}

-(void)setSettingModel:(NKSettingModel *)settingModel{
    
    _settingModel = settingModel;
    
    NSString *image = settingModel.icon;
    UIImage *img = [UIImage imageNamed:image];
    self.iconView.image = img;
    self.titleLabel.text = settingModel.title;
}

 /*---- 当cell 是点击状态时,Line不隐藏 -----*/
-(void)setHighlighted:(BOOL)highlighted animated:(BOOL)animated{
    [super setHighlighted:highlighted animated:animated];
    self.lineView.backgroundColor = [UIColor blackColor];
}

-(void)setSelected:(BOOL)selected animated:(BOOL)animated{
    [super setSelected:selected animated:animated];
    self.lineView.backgroundColor = [UIColor blackColor];
}

@end
